﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Telerik.Windows.Controls;

namespace IndustrialSmokeCalc
{
    public partial class BenchmarkUserControl : UserControl
    {
        private bool _lineHighest;
        private bool _lineAverage;
        private bool _lineLowest;

        public BenchmarkUserControl()
        {
            InitializeComponent();
        }

        public bool LineHighest
        {
            set
            {
                _lineHighest = value;
                lineHighest.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
                //InvalidateArrange();
                InvalidateMeasure();
            }
            get { return _lineHighest; }
        }

        public bool LineAverage
        {
            set
            {
                _lineAverage = value;
                lineAverage.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
                //InvalidateArrange();
                InvalidateMeasure();
            }
            get { return _lineAverage; }
        }

        public bool LineLowest
        {
            set
            {
                _lineLowest = value;
                lineLowest.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
                //InvalidateArrange();
                InvalidateMeasure();
            }
            get { return _lineLowest; }
        }

        public ChartBehaviorCollection Behaviors
        {
            get { return radChart.Behaviors; }
            set
            {
                foreach (var item in value)
                {
                    radChart.Behaviors.Add(item);
                }
            }
        }
    }
}
